//保存图片到相册
export function saveImage(imageUrl) {
    uni.downloadFile({
        url: imageUrl,
        success(res) {
            uni.saveImageToPhotosAlbum({
                filePath: res.tempFilePath,
                success: function() {
                    uni.showToast({ title: '保存到相册成功', icon: 'none', duration: 1200 });
                },
                fail: function(err) {
                    uni.showToast({ title: '保存到相册失败，请重试', icon: 'none', duration: 1200 });
                }
            });
        },
        fail: (err) => { uni.showToast({ title: '保存到相册失败，请重试', icon: 'none', duration: 1200 }); }
    });
}

//复制
export function copyHandle(data) {
    wx.setClipboardData({
        data: data,
        success (res) {
            wx.getClipboardData({
                success (res) {
                    wx.showToast({
                        title: '内容已复制',
                        icon: 'none'
                    })
                }
            })
        }
    })
}
